home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / extrac / extract.bas next >
BASIC Source File  |  1995-05-09  |  2KB  |  24 lines

  1. '                                                                                                                                                                                               '
  2. '                                                                                                                                                                                                '
  3. 'DΘfintion gΘnΘrales                                                                                                                                                                              '
  4. '                                                                                                                                                                                                  '
  5. '                                                                                                                                                                                                   '
  6.     DefInt A-Z
  7. 'Windows API function declarations                                                                                                                                           '
  8.     Declare Function GetWindowWord% Lib "user" (ByVal hWnd As Integer, ByVal nOffset As Integer)
  9.     Declare Function DrawIcon Lib "User" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal hIcon As Integer) As Integer
  10.     Declare Function DestroyIcon% Lib "User" (ByVal hIcon As Integer)
  11.     Declare Function ExtractIcon% Lib "Shell" (ByVal hInst As Integer, ByVal lpszFileName As String, ByVal nIconIndex As Integer)
  12. 'GetWindowWord constants                                                                                                                                                    '
  13.     Global Const GWW_HINSTANCE = -6
  14.     Global Const GWW_HWNDPARENT = -8
  15.  
  16. Static Function ZTrim$ (lin$)
  17.  
  18. 'ZTrim: Like Trim$, but works (only) for NULL-terminated
  19. ' (C-style) strings.
  20. ZTrim$ = Trim$(Left$(lin$, InStr(lin$, Chr$(0)) - 1))
  21.  
  22. End Function
  23.  
  24.